

/*var statusObservable = Rx.Observable.create(observer => {
  observer.next('foo');
  setTimeout(() => observer.next('bar'), 1000);
});*/
// myObservable.subscribe(value => console.log(value));

let gameBase;
let gameStatus;
let bonnusMode;

let autoPlay;
let winAmout;

let bonnusRemian; // freeSpins

let statusObservable = new Rx.Subject();

setTimeout(() => {
  statusObservable.onNext({ a: 'foo1' });
}, 1000);
setTimeout(() => {
  statusObservable.onNext({ a: 'foo2' });
}, 2000);


let initialState = {
  foo: 'bar'
};


let store = statusObservable.scan((state, val) => {
  return state.merge(val);
}, Immutable.fromJS(initialState));

export default store;

//
/*
store.onNext({ a: 'foo2' });
store.subscribe(state => {
    console.log(state.get('a'));
});

 */